<?php
/**
 * Created by PhpStorm.
 * User: banfuguang
 * Date: 2018/3/25
 * Time: 20:08
 */
?>
<?php
$num = count($news);
foreach ( $news as $key => $new ) {
?>
<div class="home-item">
    <a class="item-link" href="/article-<?= $new['id'];?>.html">
        <p class="item-user"><img src="http://image.yanbing.b<?= $new['userInfo']['avatar'];?>" alt=""/><?= $new['authorname'];?></p>
        <p><?= $new['title'];?></p>
        <img src="http://image.yanbing.b<?= $new['image'];?>" alt=""/>
    </a>
    <div class="item-info">
        <span class="item-time"><?= $new['ptime'];?></span>
        <span class="item-finger"><?= $new['up'];?></span>
    </div>
</div>
<?php
    if( $isfirst && $num >= 4 && 3 == $key ){
        foreach ( $banners as $banner){
            if( $banner['position'] == 1 ) {
?>
                <div class="home-item item-img">
                    <a href="#">
                        <img src="http://image.yanbing.b<?= $banner['image'];?>" alt=""/>
                        <p><?= $banner['title'];?></p>
                    </a>
                </div>
<?php
            }
        }
    }
}
?>
<!-- img -->
<!-- img -->

